<template>
  <div>
      <div>阿斯顿噶和大家看完

      {{paramslist}}
      {{workf}}
      <p v-for="i in workf" :key="i">
          <van-field v-if="i.type == 'input'" :label='i.name' type='datetime'></van-field>
         <van-uploader v-if="i.type == 'file'"/>
                
                <el-date-picker
                v-model="value1"
                type="daterange"
                range-separator="至"
                start-placeholder="开始日期"
                end-placeholder="结束日期">
                </el-date-picker>
             <select v-if="i.type == 'select'">
                  <option :value="o.type" v-for='o in i.values' :key="o">{{o.name}}</option>
              </select>
              <van-uploader v-if="i.type == 'file'"/>
      </p>
      </div>
  </div>
</template>

<script>
export default {
data(){
    return{
        wid:this.$route.query.id,
        workf:{},
        paramslist:[]
    }
},
methods:{
    getwork(){
        this.myaxios('http://127.0.0.1:5000/workflow','post',{"id":this.wid})
        .then(res=>{
            this.workf=res.data.workf
            console.log(res)
            this.paramslist = JSON.parse(res.data.workf.params)
        })
    }
},
mounted() {
  this.getwork()

  }
}
</script>

<style>

</style>